
package l1j.server.server.serverpackets;

//import java.util.logging.Level;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;
//import java.sql.*;

//import l1j.server.L1DatabaseFactory;
import l1j.server.server.Opcodes;
//import l1j.server.server.utils.SQLUtil;

public class S_Printvalue extends ServerBasePacket {

	private static final String S_Printvalue = "[C] S_Printvalue";

	private static Logger _log = Logger.getLogger(S_Printvalue.class.getName());

	private byte[] _byte = null;

	public S_Printvalue(String value,String title) {
		buildPacket(value, title);
	}

	private void buildPacket(String value, String title) {
		try {
			writeC(Opcodes.S_OPCODE_BOARDREAD);
			writeD(1);
			writeS(" ");
			writeS(" ");
			writeS(title);
			writeS(value);
		} catch (Exception e) {
			System.out.println("error");
		}
	}

	@Override
	public byte[] getContent() {
		if (_byte == null) {
			_byte = getBytes();
		}
		return _byte;
	}

	@Override
	public String getType() {
		return S_Printvalue;
	}
}